package edu.uclmgmu.bacteriosec.aspects.com.mysql.jdbc.Connection;

import com.mysql.jdbc.*;
import java.sql.*;
import edu.uclmgmu.bacteriosec.aspects.common.Store;

privileged aspect Connection_CountCalls {
	
	/** boolean */
	boolean around(com.mysql.jdbc.Connection caller) : target(caller) && 
	call(boolean com.mysql.jdbc.Connection.getCacheResultSetMetadata()) {
		Store.updateNumberOfCalls(thisJoinPointStaticPart.getSignature().toString());
		return proceed(caller);
	}

	boolean around(com.mysql.jdbc.Connection caller) : target(caller) && 
	call(boolean com.mysql.jdbc.Connection.getUseFastIntParsing()) {
		Store.updateNumberOfCalls(thisJoinPointStaticPart.getSignature().toString());
		return proceed(caller);
	}

	boolean around(com.mysql.jdbc.Connection caller) : target(caller) && 
	call(boolean com.mysql.jdbc.Connection.supportsQuotedIdentifiers()) {
		Store.updateNumberOfCalls(thisJoinPointStaticPart.getSignature().toString());
		return proceed(caller);
	}
	
	boolean around(com.mysql.jdbc.Connection caller) : target(caller) && 
	call(boolean com.mysql.jdbc.Connection.useMaxRows()) {
		Store.updateNumberOfCalls(thisJoinPointStaticPart.getSignature().toString());
		return proceed(caller);
	}

}
